using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VVKSAMPEL
    {
        public DataRow Convert2VKSAMPEL(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryVKSAMPEL(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["VKSAMANDANT"] = " ".PadRight(2 ); 
         dwReturn["VKSAAUFKRS"] = " ".PadRight(2 ); 
         dwReturn["VKSAAUFLFD"] = " ".PadRight(6 ); 
         dwReturn["VKSAAUFPOS"] = " ".PadRight(3 ); 
         dwReturn["VKSAAENZL"] = " ".PadRight(0 ); 
         dwReturn["VKSAAENB"] = " ".PadRight(8 ); 
         dwReturn["VKSAAEND"] = " ".PadRight(0 ); 
         dwReturn["VKSANEUB"] = " ".PadRight(8 ); 
         dwReturn["VKSANEUD"] = " ".PadRight(0 ); 
         dwReturn["VKSAPRKZM1"] = " ".PadRight(2 ); 
         dwReturn["VKSAPRKZM2"] = " ".PadRight(2 ); 
         dwReturn["VKSAPRKZMULA"] = " ".PadRight(2 ); 
         dwReturn["VKSAFARBE1"] = " ".PadRight(10 ); 
         dwReturn["VKSAANZPKM11"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSPKM11"] = " ".PadRight(3 ); 
         dwReturn["VKSAANZPKM21"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSPKM21"] = " ".PadRight(3 ); 
         dwReturn["VKSAANZMULA1"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSMULA1"] = " ".PadRight(3 ); 
         dwReturn["VKSABESTLNG1"] = " ".PadRight(0 ); 
         dwReturn["VKSAPOSCP1"] = " ".PadRight(3 ); 
         dwReturn["VKSAFARBE2"] = " ".PadRight(10 ); 
         dwReturn["VKSAANZPKM12"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSPKM12"] = " ".PadRight(3 ); 
         dwReturn["VKSAANZPKM22"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSPKM22"] = " ".PadRight(3 ); 
         dwReturn["VKSAANZMULA2"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSMULA2"] = " ".PadRight(3 ); 
         dwReturn["VKSABESTLNG2"] = " ".PadRight(0 ); 
         dwReturn["VKSAPOSCP2"] = " ".PadRight(3 ); 
         dwReturn["VKSAFARBE3"] = " ".PadRight(10 ); 
         dwReturn["VKSAANZPKM13"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSPKM13"] = " ".PadRight(3 ); 
         dwReturn["VKSAANZPKM23"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSPKM23"] = " ".PadRight(3 ); 
         dwReturn["VKSAANZMULA3"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSMULA3"] = " ".PadRight(3 ); 
         dwReturn["VKSABESTLNG3"] = " ".PadRight(0 ); 
         dwReturn["VKSAPOSCP3"] = " ".PadRight(3 ); 
         dwReturn["VKSAFARBE4"] = " ".PadRight(10 ); 
         dwReturn["VKSAANZPKM14"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSPKM14"] = " ".PadRight(3 ); 
         dwReturn["VKSAANZPKM24"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSPKM24"] = " ".PadRight(3 ); 
         dwReturn["VKSAANZMULA4"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSMULA4"] = " ".PadRight(3 ); 
         dwReturn["VKSABESTLNG4"] = " ".PadRight(0 ); 
         dwReturn["VKSAPOSCP4"] = " ".PadRight(3 ); 
         dwReturn["VKSAFARBE5"] = " ".PadRight(10 ); 
         dwReturn["VKSAANZPKM15"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSPKM15"] = " ".PadRight(3 ); 
         dwReturn["VKSAANZPKM25"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSPKM25"] = " ".PadRight(3 ); 
         dwReturn["VKSAANZMULA5"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSMULA5"] = " ".PadRight(3 ); 
         dwReturn["VKSABESTLNG5"] = " ".PadRight(0 ); 
         dwReturn["VKSAPOSCP5"] = " ".PadRight(3 ); 
         dwReturn["VKSAFARBE6"] = " ".PadRight(10 ); 
         dwReturn["VKSAANZPKM16"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSPKM16"] = " ".PadRight(3 ); 
         dwReturn["VKSAANZPKM26"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSPKM26"] = " ".PadRight(3 ); 
         dwReturn["VKSAANZMULA6"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSMULA6"] = " ".PadRight(3 ); 
         dwReturn["VKSABESTLNG6"] = " ".PadRight(0 ); 
         dwReturn["VKSAPOSCP6"] = " ".PadRight(3 ); 
         dwReturn["VKSAFARBE7"] = " ".PadRight(10 ); 
         dwReturn["VKSAANZPKM17"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSPKM17"] = " ".PadRight(3 ); 
         dwReturn["VKSAANZPKM27"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSPKM27"] = " ".PadRight(3 ); 
         dwReturn["VKSAANZMULA7"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSMULA7"] = " ".PadRight(3 ); 
         dwReturn["VKSABESTLNG7"] = " ".PadRight(0 ); 
         dwReturn["VKSAPOSCP7"] = " ".PadRight(3 ); 
         dwReturn["VKSAFARBE8"] = " ".PadRight(10 ); 
         dwReturn["VKSAANZPKM18"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSPKM18"] = " ".PadRight(3 ); 
         dwReturn["VKSAANZPKM28"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSPKM28"] = " ".PadRight(3 ); 
         dwReturn["VKSAANZMULA8"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSMULA8"] = " ".PadRight(3 ); 
         dwReturn["VKSABESTLNG8"] = " ".PadRight(0 ); 
         dwReturn["VKSAPOSCP8"] = " ".PadRight(3 ); 
         dwReturn["VKSAFARBE9"] = " ".PadRight(10 ); 
         dwReturn["VKSAANZPKM19"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSPKM19"] = " ".PadRight(3 ); 
         dwReturn["VKSAANZPKM29"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSPKM29"] = " ".PadRight(3 ); 
         dwReturn["VKSAANZMULA9"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSMULA9"] = " ".PadRight(3 ); 
         dwReturn["VKSABESTLNG9"] = " ".PadRight(0 ); 
         dwReturn["VKSAPOSCP9"] = " ".PadRight(3 ); 
         dwReturn["VKSAFARBE10"] = " ".PadRight(10 ); 
         dwReturn["VKSAANZPKM110"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSPKM110"] = " ".PadRight(3 ); 
         dwReturn["VKSAANZPKM210"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSPKM210"] = " ".PadRight(3 ); 
         dwReturn["VKSAANZMULA10"] = " ".PadRight(2 ); 
         dwReturn["VKSAPOSMULA10"] = " ".PadRight(3 ); 
         dwReturn["VKSABESTLNG10"] = " ".PadRight(0 ); 
         dwReturn["VKSAPOSCP10"] = " ".PadRight(3 ); 
         dwReturn["VKSAANZAUSFM"] = " ".PadRight(2 ); 
         dwReturn["VKSAMUSTERKZ"] = " ".PadRight(1 ); 
         dwReturn["VKSAAUSFMP"] = " ".PadRight(1 ); 
         dwReturn["VKSAERLDAT"] = " ".PadRight(0 ); 
         dwReturn["VKSAERLBEN"] = " ".PadRight(8 ); 
         dwReturn["VKSAVAM"] = " ".PadRight(3 ); 
         dwReturn["VKSASPEDM"] = " ".PadRight(3 ); 
         dwReturn["VKSAVAC"] = " ".PadRight(3 ); 
         dwReturn["VKSASPEDC"] = " ".PadRight(3 ); 
         dwReturn["VKSAPRKZC"] = " ".PadRight(2 ); 
         dwReturn["VKSAFILLER"] = " ".PadRight(55 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapVKSAMPEL(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveVKSAMPEL(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryVKSAMPEL(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapVKSAMPEL(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertVKSAMPEL(dwLocal, ITXDBVERSION);
            }
            UpdateVKSAMPEL(dwLocal);
        }
        public void InsertVKSAMPEL(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO VKSAMPEL(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryVKSAMPEL(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM VKSAMPEL WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM VKSAMPEL  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "VKSAMPEL";
            Return = Result;
            return Return;
        }
        public void DeleteVKSAMPEL(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM VKSAMPEL   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateVKSAMPEL(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE VKSAMPEL SET "
                    +"VKSAMANDANT= :VKSAMANDANT,"
                    +"VKSAAUFKRS= :VKSAAUFKRS,"
                    +"VKSAAUFLFD= :VKSAAUFLFD,"
                    +"VKSAAUFPOS= :VKSAAUFPOS,"
                    +"VKSAAENZL= :VKSAAENZL,"
                    +"VKSAAENB= :VKSAAENB,"
                    +"VKSAAEND= :VKSAAEND,"
                    +"VKSANEUB= :VKSANEUB,"
                    +"VKSANEUD= :VKSANEUD,"
                    +"VKSAPRKZM1= :VKSAPRKZM1,"
                    +"VKSAPRKZM2= :VKSAPRKZM2,"
                    +"VKSAPRKZMULA= :VKSAPRKZMULA,"
                    +"VKSAFARBE1= :VKSAFARBE1,"
                    +"VKSAANZPKM11= :VKSAANZPKM11,"
                    +"VKSAPOSPKM11= :VKSAPOSPKM11,"
                    +"VKSAANZPKM21= :VKSAANZPKM21,"
                    +"VKSAPOSPKM21= :VKSAPOSPKM21,"
                    +"VKSAANZMULA1= :VKSAANZMULA1,"
                    +"VKSAPOSMULA1= :VKSAPOSMULA1,"
                    +"VKSABESTLNG1= :VKSABESTLNG1,"
                    +"VKSAPOSCP1= :VKSAPOSCP1,"
                    +"VKSAFARBE2= :VKSAFARBE2,"
                    +"VKSAANZPKM12= :VKSAANZPKM12,"
                    +"VKSAPOSPKM12= :VKSAPOSPKM12,"
                    +"VKSAANZPKM22= :VKSAANZPKM22,"
                    +"VKSAPOSPKM22= :VKSAPOSPKM22,"
                    +"VKSAANZMULA2= :VKSAANZMULA2,"
                    +"VKSAPOSMULA2= :VKSAPOSMULA2,"
                    +"VKSABESTLNG2= :VKSABESTLNG2,"
                    +"VKSAPOSCP2= :VKSAPOSCP2,"
                    +"VKSAFARBE3= :VKSAFARBE3,"
                    +"VKSAANZPKM13= :VKSAANZPKM13,"
                    +"VKSAPOSPKM13= :VKSAPOSPKM13,"
                    +"VKSAANZPKM23= :VKSAANZPKM23,"
                    +"VKSAPOSPKM23= :VKSAPOSPKM23,"
                    +"VKSAANZMULA3= :VKSAANZMULA3,"
                    +"VKSAPOSMULA3= :VKSAPOSMULA3,"
                    +"VKSABESTLNG3= :VKSABESTLNG3,"
                    +"VKSAPOSCP3= :VKSAPOSCP3,"
                    +"VKSAFARBE4= :VKSAFARBE4,"
                    +"VKSAANZPKM14= :VKSAANZPKM14,"
                    +"VKSAPOSPKM14= :VKSAPOSPKM14,"
                    +"VKSAANZPKM24= :VKSAANZPKM24,"
                    +"VKSAPOSPKM24= :VKSAPOSPKM24,"
                    +"VKSAANZMULA4= :VKSAANZMULA4,"
                    +"VKSAPOSMULA4= :VKSAPOSMULA4,"
                    +"VKSABESTLNG4= :VKSABESTLNG4,"
                    +"VKSAPOSCP4= :VKSAPOSCP4,"
                    +"VKSAFARBE5= :VKSAFARBE5,"
                    +"VKSAANZPKM15= :VKSAANZPKM15,"
                    +"VKSAPOSPKM15= :VKSAPOSPKM15,"
                    +"VKSAANZPKM25= :VKSAANZPKM25,"
                    +"VKSAPOSPKM25= :VKSAPOSPKM25,"
                    +"VKSAANZMULA5= :VKSAANZMULA5,"
                    +"VKSAPOSMULA5= :VKSAPOSMULA5,"
                    +"VKSABESTLNG5= :VKSABESTLNG5,"
                    +"VKSAPOSCP5= :VKSAPOSCP5,"
                    +"VKSAFARBE6= :VKSAFARBE6,"
                    +"VKSAANZPKM16= :VKSAANZPKM16,"
                    +"VKSAPOSPKM16= :VKSAPOSPKM16,"
                    +"VKSAANZPKM26= :VKSAANZPKM26,"
                    +"VKSAPOSPKM26= :VKSAPOSPKM26,"
                    +"VKSAANZMULA6= :VKSAANZMULA6,"
                    +"VKSAPOSMULA6= :VKSAPOSMULA6,"
                    +"VKSABESTLNG6= :VKSABESTLNG6,"
                    +"VKSAPOSCP6= :VKSAPOSCP6,"
                    +"VKSAFARBE7= :VKSAFARBE7,"
                    +"VKSAANZPKM17= :VKSAANZPKM17,"
                    +"VKSAPOSPKM17= :VKSAPOSPKM17,"
                    +"VKSAANZPKM27= :VKSAANZPKM27,"
                    +"VKSAPOSPKM27= :VKSAPOSPKM27,"
                    +"VKSAANZMULA7= :VKSAANZMULA7,"
                    +"VKSAPOSMULA7= :VKSAPOSMULA7,"
                    +"VKSABESTLNG7= :VKSABESTLNG7,"
                    +"VKSAPOSCP7= :VKSAPOSCP7,"
                    +"VKSAFARBE8= :VKSAFARBE8,"
                    +"VKSAANZPKM18= :VKSAANZPKM18,"
                    +"VKSAPOSPKM18= :VKSAPOSPKM18,"
                    +"VKSAANZPKM28= :VKSAANZPKM28,"
                    +"VKSAPOSPKM28= :VKSAPOSPKM28,"
                    +"VKSAANZMULA8= :VKSAANZMULA8,"
                    +"VKSAPOSMULA8= :VKSAPOSMULA8,"
                    +"VKSABESTLNG8= :VKSABESTLNG8,"
                    +"VKSAPOSCP8= :VKSAPOSCP8,"
                    +"VKSAFARBE9= :VKSAFARBE9,"
                    +"VKSAANZPKM19= :VKSAANZPKM19,"
                    +"VKSAPOSPKM19= :VKSAPOSPKM19,"
                    +"VKSAANZPKM29= :VKSAANZPKM29,"
                    +"VKSAPOSPKM29= :VKSAPOSPKM29,"
                    +"VKSAANZMULA9= :VKSAANZMULA9,"
                    +"VKSAPOSMULA9= :VKSAPOSMULA9,"
                    +"VKSABESTLNG9= :VKSABESTLNG9,"
                    +"VKSAPOSCP9= :VKSAPOSCP9,"
                    +"VKSAFARBE10= :VKSAFARBE10,"
                    +"VKSAANZPKM110= :VKSAANZPKM110,"
                    +"VKSAPOSPKM110= :VKSAPOSPKM110,"
                    +"VKSAANZPKM210= :VKSAANZPKM210,"
                    +"VKSAPOSPKM210= :VKSAPOSPKM210,"
                    +"VKSAANZMULA10= :VKSAANZMULA10,"
                    +"VKSAPOSMULA10= :VKSAPOSMULA10,"
                    +"VKSABESTLNG10= :VKSABESTLNG10,"
                    +"VKSAPOSCP10= :VKSAPOSCP10,"
                    +"VKSAANZAUSFM= :VKSAANZAUSFM,"
                    +"VKSAMUSTERKZ= :VKSAMUSTERKZ,"
                    +"VKSAAUSFMP= :VKSAAUSFMP,"
                    +"VKSAERLDAT= :VKSAERLDAT,"
                    +"VKSAERLBEN= :VKSAERLBEN,"
                    +"VKSAVAM= :VKSAVAM,"
                    +"VKSASPEDM= :VKSASPEDM,"
                    +"VKSAVAC= :VKSAVAC,"
                    +"VKSASPEDC= :VKSASPEDC,"
                    +"VKSAPRKZC= :VKSAPRKZC,"
                    +"VKSAFILLER= :VKSAFILLER,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("VKSAMANDANT", OracleType.NVarChar).Value = dwData["VKSAMANDANT"].ToString(); 
          or1.Parameters.Add("VKSAAUFKRS", OracleType.NVarChar).Value = dwData["VKSAAUFKRS"].ToString(); 
          or1.Parameters.Add("VKSAAUFLFD", OracleType.NVarChar).Value = dwData["VKSAAUFLFD"].ToString(); 
          or1.Parameters.Add("VKSAAUFPOS", OracleType.NVarChar).Value = dwData["VKSAAUFPOS"].ToString(); 
          or1.Parameters.Add("VKSAAENZL", OracleType.NVarChar).Value = dwData["VKSAAENZL"].ToString(); 
          or1.Parameters.Add("VKSAAENB", OracleType.NVarChar).Value = dwData["VKSAAENB"].ToString(); 
          or1.Parameters.Add("VKSAAEND", OracleType.NVarChar).Value = dwData["VKSAAEND"].ToString(); 
          or1.Parameters.Add("VKSANEUB", OracleType.NVarChar).Value = dwData["VKSANEUB"].ToString(); 
          or1.Parameters.Add("VKSANEUD", OracleType.NVarChar).Value = dwData["VKSANEUD"].ToString(); 
          or1.Parameters.Add("VKSAPRKZM1", OracleType.NVarChar).Value = dwData["VKSAPRKZM1"].ToString(); 
          or1.Parameters.Add("VKSAPRKZM2", OracleType.NVarChar).Value = dwData["VKSAPRKZM2"].ToString(); 
          or1.Parameters.Add("VKSAPRKZMULA", OracleType.NVarChar).Value = dwData["VKSAPRKZMULA"].ToString(); 
          or1.Parameters.Add("VKSAFARBE1", OracleType.NVarChar).Value = dwData["VKSAFARBE1"].ToString(); 
          or1.Parameters.Add("VKSAANZPKM11", OracleType.NVarChar).Value = dwData["VKSAANZPKM11"].ToString(); 
          or1.Parameters.Add("VKSAPOSPKM11", OracleType.NVarChar).Value = dwData["VKSAPOSPKM11"].ToString(); 
          or1.Parameters.Add("VKSAANZPKM21", OracleType.NVarChar).Value = dwData["VKSAANZPKM21"].ToString(); 
          or1.Parameters.Add("VKSAPOSPKM21", OracleType.NVarChar).Value = dwData["VKSAPOSPKM21"].ToString(); 
          or1.Parameters.Add("VKSAANZMULA1", OracleType.NVarChar).Value = dwData["VKSAANZMULA1"].ToString(); 
          or1.Parameters.Add("VKSAPOSMULA1", OracleType.NVarChar).Value = dwData["VKSAPOSMULA1"].ToString(); 
          or1.Parameters.Add("VKSABESTLNG1", OracleType.NVarChar).Value = dwData["VKSABESTLNG1"].ToString(); 
          or1.Parameters.Add("VKSAPOSCP1", OracleType.NVarChar).Value = dwData["VKSAPOSCP1"].ToString(); 
          or1.Parameters.Add("VKSAFARBE2", OracleType.NVarChar).Value = dwData["VKSAFARBE2"].ToString(); 
          or1.Parameters.Add("VKSAANZPKM12", OracleType.NVarChar).Value = dwData["VKSAANZPKM12"].ToString(); 
          or1.Parameters.Add("VKSAPOSPKM12", OracleType.NVarChar).Value = dwData["VKSAPOSPKM12"].ToString(); 
          or1.Parameters.Add("VKSAANZPKM22", OracleType.NVarChar).Value = dwData["VKSAANZPKM22"].ToString(); 
          or1.Parameters.Add("VKSAPOSPKM22", OracleType.NVarChar).Value = dwData["VKSAPOSPKM22"].ToString(); 
          or1.Parameters.Add("VKSAANZMULA2", OracleType.NVarChar).Value = dwData["VKSAANZMULA2"].ToString(); 
          or1.Parameters.Add("VKSAPOSMULA2", OracleType.NVarChar).Value = dwData["VKSAPOSMULA2"].ToString(); 
          or1.Parameters.Add("VKSABESTLNG2", OracleType.NVarChar).Value = dwData["VKSABESTLNG2"].ToString(); 
          or1.Parameters.Add("VKSAPOSCP2", OracleType.NVarChar).Value = dwData["VKSAPOSCP2"].ToString(); 
          or1.Parameters.Add("VKSAFARBE3", OracleType.NVarChar).Value = dwData["VKSAFARBE3"].ToString(); 
          or1.Parameters.Add("VKSAANZPKM13", OracleType.NVarChar).Value = dwData["VKSAANZPKM13"].ToString(); 
          or1.Parameters.Add("VKSAPOSPKM13", OracleType.NVarChar).Value = dwData["VKSAPOSPKM13"].ToString(); 
          or1.Parameters.Add("VKSAANZPKM23", OracleType.NVarChar).Value = dwData["VKSAANZPKM23"].ToString(); 
          or1.Parameters.Add("VKSAPOSPKM23", OracleType.NVarChar).Value = dwData["VKSAPOSPKM23"].ToString(); 
          or1.Parameters.Add("VKSAANZMULA3", OracleType.NVarChar).Value = dwData["VKSAANZMULA3"].ToString(); 
          or1.Parameters.Add("VKSAPOSMULA3", OracleType.NVarChar).Value = dwData["VKSAPOSMULA3"].ToString(); 
          or1.Parameters.Add("VKSABESTLNG3", OracleType.NVarChar).Value = dwData["VKSABESTLNG3"].ToString(); 
          or1.Parameters.Add("VKSAPOSCP3", OracleType.NVarChar).Value = dwData["VKSAPOSCP3"].ToString(); 
          or1.Parameters.Add("VKSAFARBE4", OracleType.NVarChar).Value = dwData["VKSAFARBE4"].ToString(); 
          or1.Parameters.Add("VKSAANZPKM14", OracleType.NVarChar).Value = dwData["VKSAANZPKM14"].ToString(); 
          or1.Parameters.Add("VKSAPOSPKM14", OracleType.NVarChar).Value = dwData["VKSAPOSPKM14"].ToString(); 
          or1.Parameters.Add("VKSAANZPKM24", OracleType.NVarChar).Value = dwData["VKSAANZPKM24"].ToString(); 
          or1.Parameters.Add("VKSAPOSPKM24", OracleType.NVarChar).Value = dwData["VKSAPOSPKM24"].ToString(); 
          or1.Parameters.Add("VKSAANZMULA4", OracleType.NVarChar).Value = dwData["VKSAANZMULA4"].ToString(); 
          or1.Parameters.Add("VKSAPOSMULA4", OracleType.NVarChar).Value = dwData["VKSAPOSMULA4"].ToString(); 
          or1.Parameters.Add("VKSABESTLNG4", OracleType.NVarChar).Value = dwData["VKSABESTLNG4"].ToString(); 
          or1.Parameters.Add("VKSAPOSCP4", OracleType.NVarChar).Value = dwData["VKSAPOSCP4"].ToString(); 
          or1.Parameters.Add("VKSAFARBE5", OracleType.NVarChar).Value = dwData["VKSAFARBE5"].ToString(); 
          or1.Parameters.Add("VKSAANZPKM15", OracleType.NVarChar).Value = dwData["VKSAANZPKM15"].ToString(); 
          or1.Parameters.Add("VKSAPOSPKM15", OracleType.NVarChar).Value = dwData["VKSAPOSPKM15"].ToString(); 
          or1.Parameters.Add("VKSAANZPKM25", OracleType.NVarChar).Value = dwData["VKSAANZPKM25"].ToString(); 
          or1.Parameters.Add("VKSAPOSPKM25", OracleType.NVarChar).Value = dwData["VKSAPOSPKM25"].ToString(); 
          or1.Parameters.Add("VKSAANZMULA5", OracleType.NVarChar).Value = dwData["VKSAANZMULA5"].ToString(); 
          or1.Parameters.Add("VKSAPOSMULA5", OracleType.NVarChar).Value = dwData["VKSAPOSMULA5"].ToString(); 
          or1.Parameters.Add("VKSABESTLNG5", OracleType.NVarChar).Value = dwData["VKSABESTLNG5"].ToString(); 
          or1.Parameters.Add("VKSAPOSCP5", OracleType.NVarChar).Value = dwData["VKSAPOSCP5"].ToString(); 
          or1.Parameters.Add("VKSAFARBE6", OracleType.NVarChar).Value = dwData["VKSAFARBE6"].ToString(); 
          or1.Parameters.Add("VKSAANZPKM16", OracleType.NVarChar).Value = dwData["VKSAANZPKM16"].ToString(); 
          or1.Parameters.Add("VKSAPOSPKM16", OracleType.NVarChar).Value = dwData["VKSAPOSPKM16"].ToString(); 
          or1.Parameters.Add("VKSAANZPKM26", OracleType.NVarChar).Value = dwData["VKSAANZPKM26"].ToString(); 
          or1.Parameters.Add("VKSAPOSPKM26", OracleType.NVarChar).Value = dwData["VKSAPOSPKM26"].ToString(); 
          or1.Parameters.Add("VKSAANZMULA6", OracleType.NVarChar).Value = dwData["VKSAANZMULA6"].ToString(); 
          or1.Parameters.Add("VKSAPOSMULA6", OracleType.NVarChar).Value = dwData["VKSAPOSMULA6"].ToString(); 
          or1.Parameters.Add("VKSABESTLNG6", OracleType.NVarChar).Value = dwData["VKSABESTLNG6"].ToString(); 
          or1.Parameters.Add("VKSAPOSCP6", OracleType.NVarChar).Value = dwData["VKSAPOSCP6"].ToString(); 
          or1.Parameters.Add("VKSAFARBE7", OracleType.NVarChar).Value = dwData["VKSAFARBE7"].ToString(); 
          or1.Parameters.Add("VKSAANZPKM17", OracleType.NVarChar).Value = dwData["VKSAANZPKM17"].ToString(); 
          or1.Parameters.Add("VKSAPOSPKM17", OracleType.NVarChar).Value = dwData["VKSAPOSPKM17"].ToString(); 
          or1.Parameters.Add("VKSAANZPKM27", OracleType.NVarChar).Value = dwData["VKSAANZPKM27"].ToString(); 
          or1.Parameters.Add("VKSAPOSPKM27", OracleType.NVarChar).Value = dwData["VKSAPOSPKM27"].ToString(); 
          or1.Parameters.Add("VKSAANZMULA7", OracleType.NVarChar).Value = dwData["VKSAANZMULA7"].ToString(); 
          or1.Parameters.Add("VKSAPOSMULA7", OracleType.NVarChar).Value = dwData["VKSAPOSMULA7"].ToString(); 
          or1.Parameters.Add("VKSABESTLNG7", OracleType.NVarChar).Value = dwData["VKSABESTLNG7"].ToString(); 
          or1.Parameters.Add("VKSAPOSCP7", OracleType.NVarChar).Value = dwData["VKSAPOSCP7"].ToString(); 
          or1.Parameters.Add("VKSAFARBE8", OracleType.NVarChar).Value = dwData["VKSAFARBE8"].ToString(); 
          or1.Parameters.Add("VKSAANZPKM18", OracleType.NVarChar).Value = dwData["VKSAANZPKM18"].ToString(); 
          or1.Parameters.Add("VKSAPOSPKM18", OracleType.NVarChar).Value = dwData["VKSAPOSPKM18"].ToString(); 
          or1.Parameters.Add("VKSAANZPKM28", OracleType.NVarChar).Value = dwData["VKSAANZPKM28"].ToString(); 
          or1.Parameters.Add("VKSAPOSPKM28", OracleType.NVarChar).Value = dwData["VKSAPOSPKM28"].ToString(); 
          or1.Parameters.Add("VKSAANZMULA8", OracleType.NVarChar).Value = dwData["VKSAANZMULA8"].ToString(); 
          or1.Parameters.Add("VKSAPOSMULA8", OracleType.NVarChar).Value = dwData["VKSAPOSMULA8"].ToString(); 
          or1.Parameters.Add("VKSABESTLNG8", OracleType.NVarChar).Value = dwData["VKSABESTLNG8"].ToString(); 
          or1.Parameters.Add("VKSAPOSCP8", OracleType.NVarChar).Value = dwData["VKSAPOSCP8"].ToString(); 
          or1.Parameters.Add("VKSAFARBE9", OracleType.NVarChar).Value = dwData["VKSAFARBE9"].ToString(); 
          or1.Parameters.Add("VKSAANZPKM19", OracleType.NVarChar).Value = dwData["VKSAANZPKM19"].ToString(); 
          or1.Parameters.Add("VKSAPOSPKM19", OracleType.NVarChar).Value = dwData["VKSAPOSPKM19"].ToString(); 
          or1.Parameters.Add("VKSAANZPKM29", OracleType.NVarChar).Value = dwData["VKSAANZPKM29"].ToString(); 
          or1.Parameters.Add("VKSAPOSPKM29", OracleType.NVarChar).Value = dwData["VKSAPOSPKM29"].ToString(); 
          or1.Parameters.Add("VKSAANZMULA9", OracleType.NVarChar).Value = dwData["VKSAANZMULA9"].ToString(); 
          or1.Parameters.Add("VKSAPOSMULA9", OracleType.NVarChar).Value = dwData["VKSAPOSMULA9"].ToString(); 
          or1.Parameters.Add("VKSABESTLNG9", OracleType.NVarChar).Value = dwData["VKSABESTLNG9"].ToString(); 
          or1.Parameters.Add("VKSAPOSCP9", OracleType.NVarChar).Value = dwData["VKSAPOSCP9"].ToString(); 
          or1.Parameters.Add("VKSAFARBE10", OracleType.NVarChar).Value = dwData["VKSAFARBE10"].ToString(); 
          or1.Parameters.Add("VKSAANZPKM110", OracleType.NVarChar).Value = dwData["VKSAANZPKM110"].ToString(); 
          or1.Parameters.Add("VKSAPOSPKM110", OracleType.NVarChar).Value = dwData["VKSAPOSPKM110"].ToString(); 
          or1.Parameters.Add("VKSAANZPKM210", OracleType.NVarChar).Value = dwData["VKSAANZPKM210"].ToString(); 
          or1.Parameters.Add("VKSAPOSPKM210", OracleType.NVarChar).Value = dwData["VKSAPOSPKM210"].ToString(); 
          or1.Parameters.Add("VKSAANZMULA10", OracleType.NVarChar).Value = dwData["VKSAANZMULA10"].ToString(); 
          or1.Parameters.Add("VKSAPOSMULA10", OracleType.NVarChar).Value = dwData["VKSAPOSMULA10"].ToString(); 
          or1.Parameters.Add("VKSABESTLNG10", OracleType.NVarChar).Value = dwData["VKSABESTLNG10"].ToString(); 
          or1.Parameters.Add("VKSAPOSCP10", OracleType.NVarChar).Value = dwData["VKSAPOSCP10"].ToString(); 
          or1.Parameters.Add("VKSAANZAUSFM", OracleType.NVarChar).Value = dwData["VKSAANZAUSFM"].ToString(); 
          or1.Parameters.Add("VKSAMUSTERKZ", OracleType.NVarChar).Value = dwData["VKSAMUSTERKZ"].ToString(); 
          or1.Parameters.Add("VKSAAUSFMP", OracleType.NVarChar).Value = dwData["VKSAAUSFMP"].ToString(); 
          or1.Parameters.Add("VKSAERLDAT", OracleType.NVarChar).Value = dwData["VKSAERLDAT"].ToString(); 
          or1.Parameters.Add("VKSAERLBEN", OracleType.NVarChar).Value = dwData["VKSAERLBEN"].ToString(); 
          or1.Parameters.Add("VKSAVAM", OracleType.NVarChar).Value = dwData["VKSAVAM"].ToString(); 
          or1.Parameters.Add("VKSASPEDM", OracleType.NVarChar).Value = dwData["VKSASPEDM"].ToString(); 
          or1.Parameters.Add("VKSAVAC", OracleType.NVarChar).Value = dwData["VKSAVAC"].ToString(); 
          or1.Parameters.Add("VKSASPEDC", OracleType.NVarChar).Value = dwData["VKSASPEDC"].ToString(); 
          or1.Parameters.Add("VKSAPRKZC", OracleType.NVarChar).Value = dwData["VKSAPRKZC"].ToString(); 
          or1.Parameters.Add("VKSAFILLER", OracleType.NVarChar).Value = dwData["VKSAFILLER"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
